//
//  UKCollectionViewProxy.h
//  UKListManager
//
//  Created by ET|冰琳 on 16/11/4.
//  Copyright © 2016年 UK. All rights reserved.
//

#import "UKDelegateProxy.h"
#import "CellBinder.h"
#import "UKListDataSource.h"
#import <UIKit/UIKit.h>


NS_ASSUME_NONNULL_BEGIN
@interface UKCollectionViewProxy : UKDelegateProxy<UICollectionViewDataSource, UICollectionViewDelegate>

/**
 当列表cell种类大于1时，可实现UKListIdentifierDelegate返回对应cell的identifier，
 当cell实现了CellBinder协议时，会自动调用- (void)bindWithViewModel:(id)model;
 设置好cell
 */
@property (nonatomic, assign, nullable) id<UKListIdentifierDelegate>  identifierDelegate;


- (instancetype)initWithIdentifier:(NSString *)identifier
                       cacheHeight:(BOOL)cache
                        dataSource:(id<UKListDataSource>)dataSource
                        cellConfig:(nullable ListCellConfiguration)cellConfig;

/**
 设置cell选中时执行的action
 called by - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

 @param selectItemAction cell选中时执行的动作
 */
- (void)setSelectItemAction:(ListItemSelect)selectItemAction;

NS_ASSUME_NONNULL_END

@end
